<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>后台管理系统--一级分类</title>
    <link rel="stylesheet" href="./assets/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="./assets/bootstrap-validator/css/bootstrapValidator.css">
    <link rel="stylesheet" href="./css/common.css">
    <link rel="stylesheet" href="css/second-category.css">
</head>
<body>
<!--添加二级分类的模态框-->
<div id="addEj-modal-sm" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-sm" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="addEjModalLabel">添加分类</h4>
            </div>
            <form id="add_ej_form" class="form-horizontal">
                <div class="media-body">
                    <div class="form-group">
                        <span>一级分类</span>
                        <button class="btn btn-default " type="button" data-toggle="dropdown">
                            <span class="ht_xz">请选择</span>
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu">
                            <!--TODO-->
                            <!--<li><a href="#">Action</a></li>-->
                            <!--<li><a href="#">Action</a></li>-->
                            <!--<li><a href="#">Action</a></li>-->
                        </ul>
                        <input type="hidden" name="categoryId">
                    </div>
                    <div class="form-group">
                        <input id="ht_ej_inp" type="text" class="form-control" name="brandName" placeholder="请输入二级分类的名称" />
                    </div>
                    <div class="form-group">
                        <input type="hidden" name="brandLogo">
                        <input type="file" name="pic1" id="fileupload" class="btn btn-default" >
                        <a href="javascript:;" class="btn btn-default">上传图片</a>
                        <div class="file_img_box"><img src="./images/none.png" alt=""></div>
                    </div>
                </div>
                <input type="hidden" name="hot" value="1">
            </form>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button id="ht_add_ej" type="submit" class="btn btn-primary" form="add_ej_form">确认</button>
            </div>
        </div>
    </div>
</div>
<!--退出的模态框-->
<div id="logOut-modal-sm" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-sm" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">温馨提示</h4>
            </div>
            <div class="media-body">
                <p class="text-danger">
                    <span class="glyphicon glyphicon-info-sign"></span>
                    您确定要退出后台管理系统吗？
                </p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button id="ht_logOut" type="button" class="btn btn-primary">确认</button>
            </div>
        </div>
    </div>
</div>
<!--整个大容器-->
<div class="ht_box ht_index_box">
    <div class="container-fluid">
        <div class="row">
            <div class="col-xs-2 ht_index_le">
                <!--logo文字-->
                <div class="ht_index_leTo">
                    <p>ITCAST</p>
                </div>
                <!--左侧导航-->
                <div class="ht_index_leBo">
                    <div>
                        <img src="./images/default.png" alt="">
                        <span>超级管理员</span>
                    </div>
                    <ul>
                        <li><a href="userMan.html"><span class="glyphicon glyphicon-user"></span> 用户管理</a></li>
                        <li class="activeOne">
                            <a class="ht_flGl" href="javascirpt:;"><span class="glyphicon glyphicon-th-list"></span> 分类管理</a>
                            <ul class="ht_inLeBo_hid">
                                <li><a href="first-category.html">一级分类</a></li>
                                <li class="activeTwo"><a href="second-category.html">二级分类</a></li>
                            </ul>
                        </li>
                        <li><a href="javascript:;"><span class="glyphicon glyphicon-tag"></span> 商品管理</a></li>
                    </ul>
                </div>
            </div>
            <div class="col-xs-10 ht_index_ri">
                <!--上半图标-->
                <div class="ht_index_riTo">
                    <a href="javascript:;" class="glyphicon glyphicon-align-justify ht_nav_flag"></a>
                    <a  role="button" class="glyphicon glyphicon-log-out" data-toggle="modal" data-target="#logOut-modal-sm"></a>
                </div>
                <!--下半统计-->
                <div class="ht_index_riBo">
                    <ul class="ht_inRiBo_nav clearfix">
                        <li><a href="javacript:;">管理系统</a></li>
                        <li>/</li>
                        <li><a href="javacript:;">分类管理</a></li>
                        <li>/</li>
                        <li><a href="javacript:;">二级分类</a></li>
                    </ul>
                    <div class="ht_adContent">
                        <div><button id="add_second_category" type="button" class="btn btn-default" data-toggle="modal" data-target="#addEj-modal-sm">添加分类</button></div>
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <th>序号</th>
                                <th>一级分类名称</th>
                                <th>二级分类名称</th>
                                <th>二级分类LOGO</th>
                            </tr>
                            </thead>
                            <tbody id="ejData">
                            <!--TODO-->

                            </tbody>
                        </table>
                        <div class="ht_page">
                            <ul class="pagination"></ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/html" id="ejTem">
    {{ each rows }}
        <tr>
            <td>{{ $index + 1 + (page - 1) * size}}</td>
            <td>{{ $value.categoryName }}</td>
            <td>{{ $value.brandName }}</td>
            <td><img src="{{ $value.brandLogo }}" alt="" width="36"> </td>
        </tr>
    {{ /each }}
</script>
<script type="text/html" id="yjEjTem">
    {{ each rows }}
        <li data-id="{{ $value.id }}"><a href="#">{{ $value.categoryName }}</a></li>
    {{ /each }}
</script>
<script src="./assets/jquery/jquery.js"></script>
<script src="./assets/bootstrap/js/bootstrap.js"></script>
<script src="assets/jquery-fileupload/jquery.ui.widget.js"></script>
<script src="assets/jquery-fileupload/jquery.iframe-transport.js"></script>
<script src="assets/jquery-fileupload/jquery.fileupload.js"></script>
<script src="./assets/bootstrap-validator/js/bootstrapValidator.js"></script>
<script src="./assets/artTemplate/template-web.js"></script>
<script src="assets/bootstrap-paginator/bootstrap-paginator.min.js"></script>
<script src="./js/common.js"></script>
<script src="js/second-category.js"></script>
</body>
</html>